<?php
session_start();
if(empty($_SESSION["id_usuario"])) header("Location:index.php");
include("inc/copaamerica.class.php");
$manager = new copaamerica();

if(isset($_POST['sede']) && isset($_POST['noticia'])){
	if($manager->AgregaNoticia($_POST['sede'],$_POST['noticia'])){
		header("Location:agregar_noticia.php?e=1");
	}
	else{
		header("Location:agregar_noticia.php?e=2");
	}
}
else{
	header("Location:agregar_noticia.php?e=0");
}
?>